//
//  SortCollectionViewCell.m
//  FruitVIP
//
//  Created by 孙艳玲 on 15/6/30.
//  Copyright (c) 2015年 孙艳玲. All rights reserved.
//

#import "SortCollectionViewCell.h"

#define SCREEN_WIDTH ([UIScreen mainScreen].bounds.size.width)
#define SCREEN_HEIGHT ([UIScreen mainScreen].bounds.size.height)

@implementation SortCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self getUI];
    }
    return self;
}

- (void)getUI
{
    UIImageView *fruitImageView = [[UIImageView alloc] initWithFrame:CGRectMake(10, 15, 20, 20)];
//    fruitImageView.backgroundColor = [UIColor yellowColor];
    fruitImageView.userInteractionEnabled = YES;
    UIImage *fruitImage = [UIImage imageNamed:@"fruitImageView.png"];
    fruitImageView.image = fruitImage;
    fruitImageView.contentMode = UIViewContentModeScaleAspectFit;
    [self.contentView addSubview:fruitImageView];
    
    UILabel *fruitName = [[UILabel alloc] initWithFrame:CGRectMake(fruitImageView.frame.origin.x + fruitImageView.frame.size.width + 3, 10, SCREEN_WIDTH/3 - fruitImageView.frame.size.width - 13, 30)];
//    fruitName.backgroundColor = [UIColor redColor];
    fruitName.text = @"车厘子/樱桃";
    fruitName.textColor = [UIColor colorWithRed:108.0/255.0 green:75.0/255.0 blue:65.0/255.0 alpha:1];
    fruitName.font = [UIFont systemFontOfSize:13];
    [self.contentView addSubview:fruitName];
}
@end
